<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<link rel=icon href="../img/favicon.ico">
<title>Cloud local</title>
</head>
<body>
		<button type="button" onclick="realFunction();">Click Me!</button>
		<p id="text">hallo</p>
</body>

<script src="../js/socket.io.js"></script>
<script>
	
	var socket = io.connect(window.location.hostname+':8082');
	
	function realFunction(){
	
	 
	 
	 
	 setInterval(function(){
	
	
	
	socket.emit('getReq', 'sulf.c.peterpan' );	

	}, 100);
	
	}
	socket.on('getRes',  ( function (data) {
		
	
			
			 document.getElementById('text').innerHTML = data.name + ' '+ i ;
			console.log('test '+i);
			i++;
	}));
	
	var i = 0;
	
	var valuesss;
	
	

 
  
   
     
	
	
	
</script>
</html>